﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

using Qianwei.Model;
using Qianwei.Dac;
using Qianwei.Common;
using Qianwei.Common.Extension;

namespace Qianwei.Biz
{
    public class MenuInfoManager : ManagerBase<MenuInfoManager>
    {
        /// <summary>
        /// 获取菜单列表
        /// </summary>
        /// <param name="strWhere"></param>
        /// <returns></returns>
        public IList<menu_info> QueryMenuInfo(string strWhere)
        {
            MySQLHelper msh = new MySQLHelper();
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select * ");
            strSql.Append(" FROM menu_info ");
            if (strWhere != null && strWhere.Trim().Length > 0)
            {
                strSql.Append(" where " + strWhere);
            }
            IList<menu_info> milist = Mapper.DataReaderToList<menu_info>(msh.ExecuteReader(strSql.ToString()));
            return milist;
        }
    }
}
